home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 April: Mac OS SDK / Dev.CD Apr 00 SDK1.toast / Development Kits / Mac OS / UPDATE- Int&Libs 3.2 / AIncludes / ATSUnicode.a < prev    next >
Encoding:
Text File  |  1999-05-25  |  43.5 KB  |  1,200 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        ATSUnicode.a
  3. ;
  4. ;    Contains:    Public interfaces for Apple Type Services for Unicode Imaging
  5. ;
  6. ;    Version:    Technology:    Allegro
  7. ;                Release:    Veronica Seed, Use with 3.2 Universal Interfaces
  8. ;
  9. ;    Copyright:    © 1997-1999 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__ATSUNICODE__') = 'UNDEFINED' THEN
  18. __ATSUNICODE__ SET 1
  19.  
  20.     IF &TYPE('__ATSLAYOUTTYPES__') = 'UNDEFINED' THEN
  21.     include 'ATSLayoutTypes.a'
  22.     ENDIF
  23.     IF &TYPE('__SFNTLAYOUTTYPES__') = 'UNDEFINED' THEN
  24.     include 'SFNTLayoutTypes.a'
  25.     ENDIF
  26.  
  27.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  28.     include 'MacTypes.a'
  29.     ENDIF
  30.     IF &TYPE('__MACMEMORY__') = 'UNDEFINED' THEN
  31.     include 'MacMemory.a'
  32.     ENDIF
  33.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  34.     include 'Quickdraw.a'
  35.     ENDIF
  36.     IF &TYPE('__TEXTCOMMON__') = 'UNDEFINED' THEN
  37.     include 'TextCommon.a'
  38.     ENDIF
  39.  
  40. ; ***********
  41. ;     Types    
  42. ; ***********
  43.  
  44. ;      UniCharArrayHandle is a handle type to correspond to 
  45. ;      UniCharArrayPtr, defined in Unicode.h.  It refers 
  46. ;      to a handle, interpreted as a pointer to an array 
  47. ;      of UniChar's (UInt16's).
  48.  
  49.  
  50.  
  51. ; typedef UniCharArrayPtr *                UniCharArrayHandle
  52.  
  53.  
  54. ;      UniCharArrayOffset is used to indicate an offset 
  55. ;      into an array of UniChar's (UInt16's).  
  56.  
  57.  
  58. ; typedef UInt32                         UniCharArrayOffset
  59.  
  60.  
  61. ;      ATSUTextMeasurement is specific to ATSUI in that measurement
  62. ;      quantities are in fractional Fixed format instead of shorts
  63. ;      used in QuickDraw Text.  This provides exact outline metrics and
  64. ;      line specifications such as line width, ascent, descent, and so on.  
  65.  
  66.  
  67. ; typedef Fixed                         ATSUTextMeasurement
  68.  
  69.  
  70. ;      ATSUFontID indicates a particular font family and face.  
  71. ;      ATSUFontID's are not guaranteed to remain constant across 
  72. ;      reboots.  Clients should use the font's unique name to 
  73. ;      get a font token to store in documents which is 
  74. ;      guaranteed to remain constant across reboots. 
  75.  
  76.  
  77. ; typedef UInt32                         ATSUFontID
  78.  
  79.  
  80. ;      ATSUFontFeatureType and ATSUFontFeatureSelector are used 
  81. ;      to identify font features.  
  82.  
  83.  
  84. ; typedef UInt16                         ATSUFontFeatureType
  85.  
  86. ; typedef UInt16                         ATSUFontFeatureSelector
  87.  
  88.  
  89. ;      ATSUFontVariationAxis and ATSUFontVariationValue are used 
  90. ;      in connection with font variations.  
  91.  
  92.  
  93. ; typedef FourCharCode                     ATSUFontVariationAxis
  94.  
  95. ; typedef Fixed                         ATSUFontVariationValue
  96.  
  97.  
  98. ;      ATSUTextLayout is used to store the attribute information 
  99. ;      associated with a contiguous block of UniChar's (UInt16's) 
  100. ;      in memory.  It's typed to be an opaque structure.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106. ;      ATSUStyle is used to store a set of individual attributes, 
  107. ;      font features, and font variations.  It's typed to be 
  108. ;      an opaque structure.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114. ;      ATSUAttributeTag is used to indicate the particular type 
  115. ;      of attribute under consideration:  font, size, color, 
  116. ;      and so on.  
  117. ;      Each style run may have at most one attribute with a 
  118. ;      given ATSUAttributeTag (i.e., a style run can't have 
  119. ;      more than one font or size) but may have none.  
  120.  
  121.  
  122. ; typedef UInt32                         ATSUAttributeTag
  123.  
  124.  
  125. ;      ATSUAttributeValuePtr is used to provide generic access 
  126. ;      to storage of attribute values, which vary in size.
  127.  
  128.  
  129. ; typedef void *                        ATSUAttributeValuePtr
  130.  
  131.  
  132. ;      ATSUAttributeInfo is used to provide a tag/size pairing.  
  133. ;      This makes it possible to provide the client information   
  134. ;      about all the attributes for a given range of text.  This   
  135. ;      structure is only used to return to the client information   
  136. ;      about a complete set of attributes.  An array of   
  137. ;      ATSUAttributeInfos is passed as a parameter so that the   
  138. ;      client can find out what attributes are set and what their   
  139. ;      individual sizes are; with that information, they can then   
  140. ;      query about the values of the attributes they're interested   
  141. ;      in.  Because arrays of ATSUAttributeInfos are used as parameters   
  142. ;      to functions, they have to be of a fixed size, hence the   
  143. ;      value is not included in the structure.  
  144.  
  145.  
  146. ATSUAttributeInfo        RECORD 0
  147. fTag                     ds.l    1                ; offset: $0 (0)
  148. fValueSize                 ds.l    1                ; offset: $4 (4)
  149. sizeof                     EQU *                    ; size:   $8 (8)
  150.                         ENDR
  151.  
  152. ;      ATSUCaret contains the complete information needed to render a
  153. ;      caret.  fX and fY is the position of one of the caret's ends
  154. ;      relative to the origin position of the line the caret belongs.
  155. ;      fDeltaX and fDeltaY is the position of the caret's other end.
  156. ;      Hence, to draw a caret, simply call MoveTo(fX, fY) followed by
  157. ;      LineTo(fDeltaX, fDeltaY) or equivalent.  The ATSUCaret will
  158. ;      contain the positions needed to draw carets on angled lines
  159. ;      and reflect angled carets and leading/trailing split caret
  160. ;      appearances.
  161.  
  162.  
  163. ATSUCaret                RECORD 0
  164. fX                         ds.l    1                ; offset: $0 (0)
  165. fY                         ds.l    1                ; offset: $4 (4)
  166. fDeltaX                     ds.l    1                ; offset: $8 (8)
  167. fDeltaY                     ds.l    1                ; offset: $C (12)
  168. sizeof                     EQU *                    ; size:   $10 (16)
  169.                         ENDR
  170.  
  171. ;      ATSUCursorMovementType currently can take three values 
  172. ;      (kATSUByCharacter, kATSUByCluster, and kATSUByWord) 
  173. ;      and is used to indicate how much to move the cursor.  
  174.  
  175.  
  176. ; typedef UInt16                         ATSUCursorMovementType
  177.  
  178.  
  179. ;      ATSUVerticalCharacterType currently can take two values 
  180. ;      (kATSUStronglyVertical, and kATSUStronglyHorizontal) and 
  181. ;      is used to indicate whether text is to be laid out as 
  182. ;      vertical glyphs or horizontal glyphs.  
  183.  
  184.  
  185. ; typedef UInt16                         ATSUVerticalCharacterType
  186.  
  187.  
  188. ;      ATSUStyleComparison is an enumeration with four values 
  189. ;      (kATUStyleUnequal, ATSUStyleContains, kATSUStyleEquals, 
  190. ;      and kATSUStyleContainedBy), and is used by ATSUCompareStyles() 
  191. ;      to indicate if the first style parameter contains as a 
  192. ;      proper subset, is equal to, or is contained by the second 
  193. ;      style parameter.
  194.  
  195.  
  196. ; typedef UInt16                         ATSUStyleComparison
  197.  
  198.  
  199. ;      ATSUFontFallbackMethod type defines the type of heap or memory callback
  200. ;      method ATSUI is to follow iin all its permanent memory allocations for
  201. ;      it clients.
  202.  
  203.  
  204. ; typedef UInt16                         ATSUFontFallbackMethod
  205.  
  206.  
  207. ;      ATSUMemoryCallbacks is a union struct that allows the ATSUI 
  208. ;      client to specify a specific heap for ATSUI use or allocation
  209. ;      callbacks of which ATSUI is to use each time ATSUI performs a
  210. ;      memory operation (alloc, grow, free).
  211.  
  212.  
  213. ATSUMemoryCallbacks        RECORD 0
  214. Alloc                     ds.l    1                ; offset: $0 (0)
  215. Free                     ds.l    1                ; offset: $4 (4)
  216. Grow                     ds.l    1                ; offset: $8 (8)
  217. memoryRefCon             ds.l    1                ; offset: $C (12)
  218.                          ORG 0
  219. heapToUse                 ds.l    1                ; offset: $0 (0)
  220.                          ORG 16
  221. sizeof                     EQU *                    ; size:   $10 (16)
  222.                         ENDR
  223.  
  224. ;      ATSUHeapSpec provides allows the ATSUI client a means of
  225. ;      specifying the heap ATSUI should allocate it's dynamic memory
  226. ;      from or that ATSUI should use the memory callback provided by
  227. ;      the client.
  228.  
  229.  
  230. ; typedef UInt16                         ATSUHeapSpec
  231.  
  232.  
  233. ;      ATSUMemorySetting is used to store the results from a ATSUSetMemoryAlloc
  234. ;      or a ATSUGetCurrentMemorySetting call.  It can also be used to change the
  235. ;      current ATSUMemorySetting by passing it into the ATSUSetCurrentMemorySetting
  236. ;      call.
  237.  
  238.  
  239.  
  240.  
  241. ; ***************************************************
  242. ;     Gestalt selectors                                
  243. ;         Move into Gestalt.i when they're stable!!!!    
  244. ; ***************************************************
  245.  
  246. gestaltATSUVersion                EQU        'uisv'
  247. gestaltATSUFeatures                EQU        'uisf'
  248.  
  249. gestaltOriginalATSUVersion        EQU        $00010000
  250. gestaltATSUUpdate1                EQU        $00020000
  251.  
  252. gestaltATSUTrackingFeature        EQU        $00000001
  253. gestaltATSUMemoryFeature        EQU        $00000001
  254. gestaltATSUFallbacksFeature        EQU        $00000001
  255. gestaltATSUGlyphBoundsFeature    EQU        $00000001
  256. gestaltATSULineControlFeature    EQU        $00000001
  257. gestaltATSULayoutCreateAndCopyFeature EQU $00000001
  258. gestaltATSULayoutCacheClearFeature EQU    $00000001
  259. ; ***************
  260. ;     Error codes    
  261. ; ***************
  262.  
  263. kATSUInvalidTextLayoutErr        EQU        -8790                ;    An attempt was made to use a ATSUTextLayout 
  264.                                                             ;    which hadn't been initialized or is otherwise 
  265.                                                             ;    in an invalid state. 
  266. kATSUInvalidStyleErr            EQU        -8791                ;    An attempt was made to use a ATSUStyle which  
  267.                                                             ;    hadn't been properly allocated or is otherwise  
  268.                                                             ;    in an invalid state.  
  269. kATSUInvalidTextRangeErr        EQU        -8792                ;    An attempt was made to extract information   
  270.                                                             ;    from or perform an operation on a ATSUTextLayout 
  271.                                                             ;    for a range of text not covered by the ATSUTextLayout.  
  272. kATSUFontsMatched                EQU        -8793                ;    This is not an error code but is returned by    
  273.                                                             ;    ATSUMatchFontsToText() when changes need to    
  274.                                                             ;    be made to the fonts associated with the text.  
  275. kATSUFontsNotMatched            EQU        -8794                ;    This value is returned by ATSUMatchFontsToText()    
  276.                                                             ;    when the text contains Unicode characters which    
  277.                                                             ;    cannot be represented by any installed font.  
  278. kATSUNoCorrespondingFontErr        EQU        -8795                ;    This value is retrned by font ID conversion 
  279.                                                             ;    routines ATSUFONDtoFontID() and ATSUFontIDtoFOND() 
  280.                                                             ;    to indicate that the input font ID is valid but 
  281.                                                             ;    there is no conversion possible.  For example, 
  282.                                                             ;    data-fork fonts can only be used with ATSUI not 
  283.                                                             ;    the FontManager, and so converting an ATSUIFontID 
  284.                                                             ;    for such a font will fail.   
  285. kATSUInvalidFontErr                EQU        -8796                ;    Used when an attempt was made to use an invalid font ID.
  286. kATSUInvalidAttributeValueErr    EQU        -8797                ;    Used when an attempt was made to use an attribute with 
  287.                                                             ;    a bad or undefined value.  
  288. kATSUInvalidAttributeSizeErr    EQU        -8798                ;    Used when an attempt was made to use an attribute with a 
  289.                                                             ;    bad size.  
  290. kATSUInvalidAttributeTagErr        EQU        -8799                ;    Used when an attempt was made to use a tag value that
  291.                                                             ;    was not appropriate for the function call it was used.  
  292. kATSUInvalidCacheErr            EQU        -8800                ;    Used when an attempt was made to read in style data 
  293.                                                             ;    from an invalid cache.  Either the format of the 
  294.                                                             ;    cached data doesn't match that used by Apple Type 
  295.                                                             ;    Services for Unicode™ Imaging, or the cached data 
  296.                                                             ;    is corrupt.  
  297. kATSUNotSetErr                    EQU        -8801                ;    Used when the client attempts to retrieve an attribute, 
  298.                                                             ;    font feature, or font variation from a style when it 
  299.                                                             ;    hadn't been set.  In such a case, the default value will
  300.                                                             ;    be returned for the attribute's value.
  301. kATSUNoStyleRunsAssignedErr        EQU        -8802                ;    Used when an attempt was made to measure, highlight or draw
  302.                                                             ;    a ATSUTextLayout object that has no styleRuns associated with it.
  303. kATSUQuickDrawTextErr            EQU        -8803                ;    Used when QuickDraw Text encounters an error rendering or measuring
  304.                                                             ;    a line of ATSUI text.
  305. kATSULowLevelErr                EQU        -8804                ;    Used when an error was encountered within the low level ATS 
  306.                                                             ;    mechanism performing an operation requested by ATSUI.
  307. kATSUNoFontCmapAvailableErr        EQU        -8805                ;    Used when no CMAP table can be accessed or synthesized for the 
  308.                                                             ;    font passed into a SetAttributes Font call.
  309. kATSUNoFontScalerAvailableErr    EQU        -8806                ;    Used when no font scaler is available for the font passed
  310.                                                             ;    into a SetAttributes Font call.
  311. kATSUCoordinateOverflowErr        EQU        -8807                ;    Used to indicate the coordinates provided to an ATSUI routine caused
  312.                                                             ;    a coordinate overflow (i.e. > 32K).
  313. kATSULastErr                    EQU        -8808                ;    The last ATSUI error code.
  314. ; ******************************************************************************
  315. ;     ATSUI Attribute tags:  Apple reserves values 0 to 65,535 (0 to 0x0000FFFF) 
  316. ;     ATSUI clients may create their own tags with any other value               
  317. ; ******************************************************************************
  318. ;     Line Control Attribute Tags 
  319.  
  320. kATSULineWidthTag                EQU        1                    ;    Type:            ATSUTextMeasurement
  321.                                                             ;    Default value:    0
  322. kATSULineRotationTag            EQU        2                    ;    Type:            Fixed (fixed value in degrees in right-handed coordinate system)
  323.                                                             ;    Default value:    0
  324. kATSULineDirectionTag            EQU        3                    ;    Type:            Boolean; values 0 or 1 (see below for value identities)
  325.                                                             ;    Default value:    GetSysDirection() ? kATSURightToLeftBaseDirection : kATSULeftToRightBaseDirection
  326. kATSULineJustificationFactorTag    EQU        4                    ;    Type:            Fract between 0 and 1
  327.                                                             ;    Default value:    kATSUNoJustification
  328. kATSULineFlushFactorTag            EQU        5                    ;    Type:            Fract between 0 and 1 
  329.                                                             ;    Default value:    kATSUStartAlignment
  330. kATSULineBaselineValuesTag        EQU        6                    ;    Type:            BslnBaselineRecord
  331.                                                             ;    Default value:    All zeros.  Calculated from other style attributes (e.g., font and point size)
  332. kATSULineLayoutOptionsTag        EQU        7                    ;    Type:            UInt32
  333.                                                             ;    Default value:    kATSLineNoLayoutOptions - other options listed in ATSLayoutTypes.h
  334. kATSULineAscentTag                EQU        8                    ;    Type:            ATSUTextMeasurement
  335.                                                             ;    Default value:    kATSUseLineHeight
  336.                                                             ;    Type:            ATSUTextMeasurement
  337. kATSULineDescentTag                EQU        9                    ;    Default value:    kATSUseLineHeight
  338. ;     Run Style Attribute Tags 
  339.  
  340.                                                             ; QuickDraw compatibility tags 
  341. kATSUQDBoldfaceTag                EQU        256                    ;    Type:            Boolean    
  342.                                                             ;    Default value:    false
  343. kATSUQDItalicTag                EQU        257                    ;    Type:            Boolean        
  344.                                                             ;    Default value:    false
  345. kATSUQDUnderlineTag                EQU        258                    ;    Type:            Boolean    
  346.                                                             ;    Default value:    false
  347. kATSUQDCondensedTag                EQU        259                    ;    Type:            Boolean    
  348.                                                             ;    Default value:    false
  349. kATSUQDExtendedTag                EQU        260                    ;    Type:            Boolean    
  350.                                                             ;    Default value:    false
  351.                                                             ; Common run tags 
  352. kATSUFontTag                    EQU        261                    ;    Type:            ATSUFontID    
  353.                                                             ;    Default value:    GetScriptVariable( smSystemScript, smScriptAppFond )
  354. kATSUSizeTag                    EQU        262                    ;    Type:            Fixed    
  355.                                                             ;    Default value:    GetScriptVariable( smSystemScript, smScriptAppFondSize )    
  356. kATSUColorTag                    EQU        263                    ;    Type:            RGBColor    
  357.                                                             ;    Default value:    (0, 0, 0)
  358.                                                             ;    Less common run tags 
  359. kATSULanguageTag                EQU        264                    ;    Type:            RegionCode    
  360.                                                             ;    Default value:    GetScriptVariable( smSystemScript, smScriptLang )
  361. kATSUVerticalCharacterTag        EQU        265                    ;    Type:            ATSUVerticalCharacterType    
  362.                                                             ;    Default value:    kATSUStronglyHorizontal
  363. kATSUImposeWidthTag                EQU        266                    ;    Type:            ATSUTextMeasurement
  364.                                                             ;    Default value:    all glyphs use their own font defined advance widths
  365. kATSUBeforeWithStreamShiftTag    EQU        267                    ;    Type:            Fixed
  366.                                                             ;    Default value:    0
  367. kATSUAfterWithStreamShiftTag    EQU        268                    ;    Type:            Fixed
  368.                                                             ;    Default value:    0
  369. kATSUCrossStreamShiftTag        EQU        269                    ;    Type:            Fixed
  370.                                                             ;    Default value:    0
  371. kATSUTrackingTag                EQU        270                    ;    Type:            Fixed
  372.                                                             ;    Default value:    kATSNoTracking
  373. kATSUHangingInhibitFactorTag    EQU        271                    ;    Type:            Fract between 0 and 1
  374.                                                             ;    Default value:    0
  375. kATSUKerningInhibitFactorTag    EQU        272                    ;    Type:            Fract between 0 and 1
  376.                                                             ;    Default value:    0
  377. kATSUDecompositionFactorTag        EQU        273                    ;    Type:            Fixed (-1.0 -> 1.0)
  378.                                                             ;    Default value:    0
  379. kATSUBaselineClassTag            EQU        274                    ;    Type:            BslnBaselineClass  (see SFNTLayoutTypes.h)
  380.                                                             ;    Default value:    kBSLNRomanBaseline - set to kBSLNNoBaselineOverride to use intrinsic baselines
  381. kATSUPriorityJustOverrideTag    EQU        275                    ;    Type:            ATSJustPriorityWidthDeltaOverrides (see ATSLayoutTypes.h)
  382.                                                             ;    Default value:    all zeros
  383. kATSUNoLigatureSplitTag            EQU        276                    ;    Type:            Boolean
  384.                                                             ;    Default value:    false - ligatures and compound characters have divisable components.
  385. kATSUNoCaretAngleTag            EQU        277                    ;    Type:            Boolean
  386.                                                             ;    Default value:    false - use the character's angularity to determine its boundaries
  387. kATSUSuppressCrossKerningTag    EQU        278                    ;    Type:            Boolean
  388.                                                             ;    Default value:    false - do not suppress automatic cross kerning (defined by font)
  389. kATSUNoOpticalAlignmentTag        EQU        279                    ;    Type:            Boolean
  390.                                                             ;    Default value:    false - do not suppress character's automatic optical positional alignment
  391. kATSUForceHangingTag            EQU        280                    ;    Type:            Boolean
  392.                                                             ;    Default value:    false - do not force the character's to hang beyond the line boundaries
  393. kATSUNoSpecialJustificationTag    EQU        281                    ;    Type:            Boolean
  394.                                                             ;    Default value:    false - perform post-compensation justification if needed
  395. kATSUMaxStyleTag                EQU        282                    ;    This is just for convenience - the upper limit of the ATSUStyle attribute tags 
  396. kATSUMaxATSUITagValue            EQU        65535                ;    This is the maximum Apple ATSUI reserved tag value.  Client defined tags must be larger.
  397. ; *******************************
  398. ;     Enumerations and constants    
  399. ; *******************************
  400. ;  Cursor movement 
  401.  
  402. kATSUByCharacter                EQU        0
  403. kATSUByCluster                    EQU        1
  404. kATSUByWord                        EQU        2
  405. ;  Vertical text types 
  406.  
  407. kATSUStronglyHorizontal            EQU        0
  408. kATSUStronglyVertical            EQU        1
  409. ;  Line direction types (used for kATSULineDirectionTag values) 
  410.  
  411. kATSULeftToRightBaseDirection    EQU        0                    ;    Impose left-to-right or top-to-bottom dominant direction 
  412. kATSURightToLeftBaseDirection    EQU        1                    ;    Impose right-to-left or bottom-to-top dominant direction 
  413. ;  Style comparison types 
  414.  
  415. kATSUStyleUnequal                EQU        0
  416. kATSUStyleContains                EQU        1
  417. kATSUStyleEquals                EQU        2
  418. kATSUStyleContainedBy            EQU        3
  419. ;  Font Fallback methods 
  420.  
  421. kATSUDefaultFontFallbacks        EQU        0
  422. kATSULastResortOnlyFallback        EQU        1
  423. kATSUSequentialFallbacksPreferred EQU    2
  424. kATSUSequentialFallbacksExclusive EQU    3
  425. ;  ATSUI heap or memory allocation specifiers (of type ATSUHeapSpec) 
  426.  
  427. kATSUUseCurrentHeap                EQU        0
  428. kATSUUseAppHeap                    EQU        1
  429. kATSUUseSpecificHeap            EQU        2
  430. kATSUUseCallbacks                EQU        3
  431. ;  LineFlushFactor convenience defined values 
  432.  
  433. kATSUStartAlignment                EQU        $00000000
  434. kATSUEndAlignment                EQU        $40000000
  435. kATSUCenterAlignment            EQU        $20000000
  436. ;  LineJustificationFactor convenience defined values 
  437.  
  438. kATSUNoJustification            EQU        $00000000
  439. kATSUFullJustification            EQU        $40000000
  440. ;  Other constants    
  441.  
  442. kATSUInvalidFontID                EQU        0
  443.  
  444.  
  445. kATSUUseLineControlWidth        EQU        $7FFFFFFF
  446.  
  447.  
  448. kATSUNoSelector                    EQU        $0000FFFF
  449.  
  450.  
  451. kATSUUseGrafPortPenLoc            EQU        $FFFFFFFF
  452. kATSUClearAll                    EQU        $FFFFFFFF
  453.  
  454.  
  455. kATSUFromTextBeginning            EQU        $FFFFFFFF
  456. kATSUToTextEnd                    EQU        $FFFFFFFF
  457.  
  458. ; ***************
  459. ;     Functions    
  460. ; ***************
  461.  
  462. ;     Clipboard support, flattened style version 0 (is is advised to not use these routines and perform your own flattening)    
  463. ;
  464. ; extern OSStatus ATSUCopyToHandle(ATSUStyle iStyle, Handle oStyleHandle)
  465. ;
  466.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  467.         IMPORT_CFM_FUNCTION ATSUCopyToHandle
  468.     ENDIF
  469.  
  470. ;
  471. ; extern OSStatus ATSUPasteFromHandle(ATSUStyle iStyle, Handle iStyleHandle)
  472. ;
  473.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  474.         IMPORT_CFM_FUNCTION ATSUPasteFromHandle
  475.     ENDIF
  476.  
  477. ;     Memory allocation specification functions    
  478. ;
  479. ; extern OSStatus ATSUCreateMemorySetting(ATSUHeapSpec iHeapSpec, ATSUMemoryCallbacks *iMemoryCallbacks, ATSUMemorySetting *oMemorySetting)
  480. ;
  481.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  482.         IMPORT_CFM_FUNCTION ATSUCreateMemorySetting
  483.     ENDIF
  484.  
  485. ;
  486. ; extern OSStatus ATSUSetCurrentMemorySetting(ATSUMemorySetting iMemorySetting)
  487. ;
  488.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  489.         IMPORT_CFM_FUNCTION ATSUSetCurrentMemorySetting
  490.     ENDIF
  491.  
  492. ;
  493. ; extern ATSUMemorySetting ATSUGetCurrentMemorySetting(void)
  494. ;
  495.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  496.         IMPORT_CFM_FUNCTION ATSUGetCurrentMemorySetting
  497.     ENDIF
  498.  
  499. ;
  500. ; extern OSStatus ATSUDisposeMemorySetting(ATSUMemorySetting iMemorySetting)
  501. ;
  502.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  503.         IMPORT_CFM_FUNCTION ATSUDisposeMemorySetting
  504.     ENDIF
  505.  
  506. ;     Basic style functions    
  507. ;
  508. ; extern OSStatus ATSUCreateStyle(ATSUStyle *oStyle)
  509. ;
  510.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  511.         IMPORT_CFM_FUNCTION ATSUCreateStyle
  512.     ENDIF
  513.  
  514. ;
  515. ; extern OSStatus ATSUCreateAndCopyStyle(ATSUStyle iStyle, ATSUStyle *oStyle)
  516. ;
  517.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  518.         IMPORT_CFM_FUNCTION ATSUCreateAndCopyStyle
  519.     ENDIF
  520.  
  521. ;
  522. ; extern OSStatus ATSUDisposeStyle(ATSUStyle iStyle)
  523. ;
  524.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  525.         IMPORT_CFM_FUNCTION ATSUDisposeStyle
  526.     ENDIF
  527.  
  528. ;
  529. ; extern OSStatus ATSUSetStyleRefCon(ATSUStyle iStyle, UInt32 iRefCon)
  530. ;
  531.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  532.         IMPORT_CFM_FUNCTION ATSUSetStyleRefCon
  533.     ENDIF
  534.  
  535. ;
  536. ; extern OSStatus ATSUGetStyleRefCon(ATSUStyle iStyle, UInt32 *oRefCon)
  537. ;
  538.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  539.         IMPORT_CFM_FUNCTION ATSUGetStyleRefCon
  540.     ENDIF
  541.  
  542. ;     Style comparison         
  543. ;
  544. ; extern OSStatus ATSUCompareStyles(ATSUStyle iFirstStyle, ATSUStyle iSecondStyle, ATSUStyleComparison *oComparison)
  545. ;
  546.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  547.         IMPORT_CFM_FUNCTION ATSUCompareStyles
  548.     ENDIF
  549.  
  550. ;     Attribute manipulations    
  551. ;
  552. ; extern OSStatus ATSUCopyAttributes(ATSUStyle iSourceStyle, ATSUStyle iDestinationStyle)
  553. ;
  554.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  555.         IMPORT_CFM_FUNCTION ATSUCopyAttributes
  556.     ENDIF
  557.  
  558. ;
  559. ; extern OSStatus ATSUOverwriteAttributes(ATSUStyle iSourceStyle, ATSUStyle iDestinationStyle)
  560. ;
  561.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  562.         IMPORT_CFM_FUNCTION ATSUOverwriteAttributes
  563.     ENDIF
  564.  
  565. ;
  566. ; extern OSStatus ATSUUnderwriteAttributes(ATSUStyle iSourceStyle, ATSUStyle iDestinationStyle)
  567. ;
  568.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  569.         IMPORT_CFM_FUNCTION ATSUUnderwriteAttributes
  570.     ENDIF
  571.  
  572. ;     Empty styles    
  573. ;
  574. ; extern OSStatus ATSUClearStyle(ATSUStyle iStyle)
  575. ;
  576.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  577.         IMPORT_CFM_FUNCTION ATSUClearStyle
  578.     ENDIF
  579.  
  580. ;
  581. ; extern OSStatus ATSUStyleIsEmpty(ATSUStyle iStyle, Boolean *oIsClear)
  582. ;
  583.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  584.         IMPORT_CFM_FUNCTION ATSUStyleIsEmpty
  585.     ENDIF
  586.  
  587. ;     Get and set attributes 
  588. ;
  589. ; extern OSStatus ATSUCalculateBaselineDeltas(ATSUStyle iStyle, BslnBaselineClass iBaselineClass, BslnBaselineRecord oBaselineDeltas)
  590. ;
  591.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  592.         IMPORT_CFM_FUNCTION ATSUCalculateBaselineDeltas
  593.     ENDIF
  594.  
  595. ;
  596. ; extern OSStatus ATSUSetAttributes(ATSUStyle iStyle, ItemCount iAttributeCount, ATSUAttributeTag iTag[2147483647], ByteCount iValueSize[2147483647], ATSUAttributeValuePtr iValue[2147483647])
  597. ;
  598.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  599.         IMPORT_CFM_FUNCTION ATSUSetAttributes
  600.     ENDIF
  601.  
  602. ;
  603. ; extern OSStatus ATSUGetAttribute(ATSUStyle iStyle, ATSUAttributeTag iTag, ByteCount iExpectedValueSize, ATSUAttributeValuePtr oValue, ByteCount *oActualValueSize)
  604. ;
  605.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  606.         IMPORT_CFM_FUNCTION ATSUGetAttribute
  607.     ENDIF
  608.  
  609. ;
  610. ; extern OSStatus ATSUGetAllAttributes(ATSUStyle iStyle, ATSUAttributeInfo oAttributeInfoArray[2147483647], ItemCount iTagValuePairArraySize, ItemCount *oTagValuePairCount)
  611. ;
  612.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  613.         IMPORT_CFM_FUNCTION ATSUGetAllAttributes
  614.     ENDIF
  615.  
  616. ;
  617. ; extern OSStatus ATSUClearAttributes(ATSUStyle iStyle, ItemCount iTagCount, ATSUAttributeTag iTag[2147483647])
  618. ;
  619.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  620.         IMPORT_CFM_FUNCTION ATSUClearAttributes
  621.     ENDIF
  622.  
  623. ;     Font features    
  624. ;
  625. ; extern OSStatus ATSUSetFontFeatures(ATSUStyle iStyle, ItemCount iFeatureCount, ATSUFontFeatureType iType[2147483647], ATSUFontFeatureSelector iSelector[2147483647])
  626. ;
  627.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  628.         IMPORT_CFM_FUNCTION ATSUSetFontFeatures
  629.     ENDIF
  630.  
  631. ;
  632. ; extern OSStatus ATSUGetFontFeature(ATSUStyle iStyle, ItemCount iFeatureIndex, ATSUFontFeatureType *oFeatureType, ATSUFontFeatureSelector *oFeatureSelector)
  633. ;
  634.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  635.         IMPORT_CFM_FUNCTION ATSUGetFontFeature
  636.     ENDIF
  637.  
  638. ;
  639. ; extern OSStatus ATSUGetAllFontFeatures(ATSUStyle iStyle, ItemCount iMaximumFeatureCount, ATSUFontFeatureType oFeatureType[2147483647], ATSUFontFeatureSelector oFeatureSelector[2147483647], ItemCount *oActualFeatureCount)
  640. ;
  641.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  642.         IMPORT_CFM_FUNCTION ATSUGetAllFontFeatures
  643.     ENDIF
  644.  
  645. ;
  646. ; extern OSStatus ATSUClearFontFeatures(ATSUStyle iStyle, ItemCount iFeatureCount, ATSUFontFeatureType iType[2147483647], ATSUFontFeatureSelector iSelector[2147483647])
  647. ;
  648.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  649.         IMPORT_CFM_FUNCTION ATSUClearFontFeatures
  650.     ENDIF
  651.  
  652. ;     Font variations    
  653. ;
  654. ; extern OSStatus ATSUSetVariations(ATSUStyle iStyle, ItemCount iVariationCount, ATSUFontVariationAxis iAxes[2147483647], ATSUFontVariationValue iValue[2147483647])
  655. ;
  656.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  657.         IMPORT_CFM_FUNCTION ATSUSetVariations
  658.     ENDIF
  659.  
  660. ;
  661. ; extern OSStatus ATSUGetFontVariationValue(ATSUStyle iStyle, ATSUFontVariationAxis iFontVariationAxis, ATSUFontVariationValue *oFontVariationValue)
  662. ;
  663.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  664.         IMPORT_CFM_FUNCTION ATSUGetFontVariationValue
  665.     ENDIF
  666.  
  667. ;
  668. ; extern OSStatus ATSUGetAllFontVariations(ATSUStyle iStyle, ItemCount iVariationCount, ATSUFontVariationAxis oVariationAxes[2147483647], ATSUFontVariationValue oFontVariationValues[2147483647], ItemCount *oActualVariationCount)
  669. ;
  670.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  671.         IMPORT_CFM_FUNCTION ATSUGetAllFontVariations
  672.     ENDIF
  673.  
  674. ;
  675. ; extern OSStatus ATSUClearFontVariations(ATSUStyle iStyle, ItemCount iAxisCount, ATSUFontVariationAxis iAxis[2147483647])
  676. ;
  677.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  678.         IMPORT_CFM_FUNCTION ATSUClearFontVariations
  679.     ENDIF
  680.  
  681. ;     Basic text-layout functions    
  682. ;
  683. ; extern OSStatus ATSUCreateTextLayout(ATSUTextLayout *oTextLayout)
  684. ;
  685.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  686.         IMPORT_CFM_FUNCTION ATSUCreateTextLayout
  687.     ENDIF
  688.  
  689. ;
  690. ; extern OSStatus ATSUCreateAndCopyTextLayout(ATSUTextLayout iTextLayout, ATSUTextLayout *oTextLayout)
  691. ;
  692.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  693.         IMPORT_CFM_FUNCTION ATSUCreateAndCopyTextLayout
  694.     ENDIF
  695.  
  696. ;
  697. ; extern OSStatus ATSUCreateTextLayoutWithTextPtr(ConstUniCharArrayPtr iText, UniCharArrayOffset iTextOffset, UniCharCount iTextLength, UniCharCount iTextTotalLength, ItemCount iNumberOfRuns, UniCharCount iRunLengths[2147483647], ATSUStyle iStyles[2147483647], ATSUTextLayout *oTextLayout)
  698. ;
  699.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  700.         IMPORT_CFM_FUNCTION ATSUCreateTextLayoutWithTextPtr
  701.     ENDIF
  702.  
  703. ;
  704. ; extern OSStatus ATSUCreateTextLayoutWithTextHandle(UniCharArrayHandle iText, UniCharArrayOffset iTextOffset, UniCharCount iTextLength, UniCharCount iTextTotalLength, ItemCount iNumberOfRuns, UniCharCount iRunLengths[2147483647], ATSUStyle iStyles[2147483647], ATSUTextLayout *oTextLayout)
  705. ;
  706.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  707.         IMPORT_CFM_FUNCTION ATSUCreateTextLayoutWithTextHandle
  708.     ENDIF
  709.  
  710. ;
  711. ; extern OSStatus ATSUClearLayoutCache(ATSUTextLayout iTextLayout, UniCharArrayOffset iLineStart)
  712. ;
  713.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  714.         IMPORT_CFM_FUNCTION ATSUClearLayoutCache
  715.     ENDIF
  716.  
  717. ;
  718. ; extern OSStatus ATSUDisposeTextLayout(ATSUTextLayout iTextLayout)
  719. ;
  720.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  721.         IMPORT_CFM_FUNCTION ATSUDisposeTextLayout
  722.     ENDIF
  723.  
  724. ;
  725. ; extern OSStatus ATSUSetTextLayoutRefCon(ATSUTextLayout iTextLayout, UInt32 iRefCon)
  726. ;
  727.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  728.         IMPORT_CFM_FUNCTION ATSUSetTextLayoutRefCon
  729.     ENDIF
  730.  
  731. ;
  732. ; extern OSStatus ATSUGetTextLayoutRefCon(ATSUTextLayout iTextLayout, UInt32 *oRefCon)
  733. ;
  734.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  735.         IMPORT_CFM_FUNCTION ATSUGetTextLayoutRefCon
  736.     ENDIF
  737.  
  738. ;     Glyph bounds retrieval    
  739. ;
  740. ; extern OSStatus ATSUGetGlyphBounds(ATSUTextLayout iTextLayout, ATSUTextMeasurement iTextBasePointX, ATSUTextMeasurement iTextBasePointY, UniCharArrayOffset iBoundsCharStart, UniCharCount iBoundsCharLength, UInt16 iTypeOfBounds, ItemCount iMaxNumberOfBounds, ATSTrapezoid oGlyphBounds[2147483647], ItemCount *oActualNumberOfBounds)
  741. ;
  742.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  743.         IMPORT_CFM_FUNCTION ATSUGetGlyphBounds
  744.     ENDIF
  745.  
  746. ;     Idle processing    
  747. ;
  748. ; extern OSStatus ATSUIdle(ATSUTextLayout iTextLayout)
  749. ;
  750.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  751.         IMPORT_CFM_FUNCTION ATSUIdle
  752.     ENDIF
  753.  
  754. ;     Text location    
  755. ;
  756. ; extern OSStatus ATSUSetTextPointerLocation(ATSUTextLayout iTextLayout, ConstUniCharArrayPtr iText, UniCharArrayOffset iTextOffset, UniCharCount iTextLength, UniCharCount iTextTotalLength)
  757. ;
  758.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  759.         IMPORT_CFM_FUNCTION ATSUSetTextPointerLocation
  760.     ENDIF
  761.  
  762. ;
  763. ; extern OSStatus ATSUSetTextHandleLocation(ATSUTextLayout iTextLayout, UniCharArrayHandle iText, UniCharArrayOffset iTextOffset, UniCharCount iTextLength, UniCharCount iTextTotalLength)
  764. ;
  765.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  766.         IMPORT_CFM_FUNCTION ATSUSetTextHandleLocation
  767.     ENDIF
  768.  
  769. ;
  770. ; extern OSStatus ATSUGetTextLocation(ATSUTextLayout iTextLayout, void **oText, Boolean *oTextIsStoredInHandle, UniCharArrayOffset *oOffset, UniCharCount *oTextLength, UniCharCount *oTextTotalLength)
  771. ;
  772.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  773.         IMPORT_CFM_FUNCTION ATSUGetTextLocation
  774.     ENDIF
  775.  
  776. ;     Text manipulation    
  777. ;
  778. ; extern OSStatus ATSUTextDeleted(ATSUTextLayout iTextLayout, UniCharArrayOffset iDeletedRangeStart, UniCharCount iDeletedRangeLength)
  779. ;
  780.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  781.         IMPORT_CFM_FUNCTION ATSUTextDeleted
  782.     ENDIF
  783.  
  784. ;
  785. ; extern OSStatus ATSUTextInserted(ATSUTextLayout iTextLayout, UniCharArrayOffset iInsertionLocation, UniCharCount iInsertionLength)
  786. ;
  787.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  788.         IMPORT_CFM_FUNCTION ATSUTextInserted
  789.     ENDIF
  790.  
  791. ;
  792. ; extern OSStatus ATSUTextMoved(ATSUTextLayout iTextLayout, ConstUniCharArrayPtr iNewLocation)
  793. ;
  794.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  795.         IMPORT_CFM_FUNCTION ATSUTextMoved
  796.     ENDIF
  797.  
  798. ;     Layout controls    
  799. ;
  800. ; extern OSStatus ATSUCopyLayoutControls(ATSUTextLayout iSourceTextLayout, ATSUTextLayout iDestTextLayout)
  801. ;
  802.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  803.         IMPORT_CFM_FUNCTION ATSUCopyLayoutControls
  804.     ENDIF
  805.  
  806. ;
  807. ; extern OSStatus ATSUSetLayoutControls(ATSUTextLayout iTextLayout, ItemCount iAttributeCount, ATSUAttributeTag iTag[2147483647], ByteCount iValueSize[2147483647], ATSUAttributeValuePtr iValue[2147483647])
  808. ;
  809.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  810.         IMPORT_CFM_FUNCTION ATSUSetLayoutControls
  811.     ENDIF
  812.  
  813. ;
  814. ; extern OSStatus ATSUGetLayoutControl(ATSUTextLayout iTextLayout, ATSUAttributeTag iTag, ByteCount iExpectedValueSize, ATSUAttributeValuePtr oValue, ByteCount *oActualValueSize)
  815. ;
  816.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  817.         IMPORT_CFM_FUNCTION ATSUGetLayoutControl
  818.     ENDIF
  819.  
  820. ;
  821. ; extern OSStatus ATSUGetAllLayoutControls(ATSUTextLayout iTextLayout, ATSUAttributeInfo oAttributeInfoArray[2147483647], ItemCount iTagValuePairArraySize, ItemCount *oTagValuePairCount)
  822. ;
  823.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  824.         IMPORT_CFM_FUNCTION ATSUGetAllLayoutControls
  825.     ENDIF
  826.  
  827. ;
  828. ; extern OSStatus ATSUClearLayoutControls(ATSUTextLayout iTextLayout, ItemCount iTagCount, ATSUAttributeTag iTag[2147483647])
  829. ;
  830.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  831.         IMPORT_CFM_FUNCTION ATSUClearLayoutControls
  832.     ENDIF
  833.  
  834. ;     Single line layout controls    
  835. ;
  836. ; extern OSStatus ATSUCopyLineControls(ATSUTextLayout iSourceTextLayout, UniCharArrayOffset iSourceLineStart, ATSUTextLayout iDestTextLayout, UniCharArrayOffset iDestLineStart)
  837. ;
  838.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  839.         IMPORT_CFM_FUNCTION ATSUCopyLineControls
  840.     ENDIF
  841.  
  842. ;
  843. ; extern OSStatus ATSUSetLineControls(ATSUTextLayout iTextLayout, UniCharArrayOffset iLineStart, ItemCount iAttributeCount, ATSUAttributeTag iTag[2147483647], ByteCount iValueSize[2147483647], ATSUAttributeValuePtr iValue[2147483647])
  844. ;
  845.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  846.         IMPORT_CFM_FUNCTION ATSUSetLineControls
  847.     ENDIF
  848.  
  849. ;
  850. ; extern OSStatus ATSUGetLineControl(ATSUTextLayout iTextLayout, UniCharArrayOffset iLineStart, ATSUAttributeTag iTag, ByteCount iExpectedValueSize, ATSUAttributeValuePtr oValue, ByteCount *oActualValueSize)
  851. ;
  852.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  853.         IMPORT_CFM_FUNCTION ATSUGetLineControl
  854.     ENDIF
  855.  
  856. ;
  857. ; extern OSStatus ATSUGetAllLineControls(ATSUTextLayout iTextLayout, UniCharArrayOffset iLineStart, ATSUAttributeInfo oAttributeInfoArray[2147483647], ItemCount iTagValuePairArraySize, ItemCount *oTagValuePairCount)
  858. ;
  859.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  860.         IMPORT_CFM_FUNCTION ATSUGetAllLineControls
  861.     ENDIF
  862.  
  863. ;
  864. ; extern OSStatus ATSUClearLineControls(ATSUTextLayout iTextLayout, UniCharArrayOffset iLineStart, ItemCount iTagCount, ATSUAttributeTag iTag[2147483647])
  865. ;
  866.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  867.         IMPORT_CFM_FUNCTION ATSUClearLineControls
  868.     ENDIF
  869.  
  870. ;     Style run processing    
  871. ;
  872. ; extern OSStatus ATSUSetRunStyle(ATSUTextLayout iTextLayout, ATSUStyle iStyle, UniCharArrayOffset iRunStart, UniCharCount iRunLength)
  873. ;
  874.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  875.         IMPORT_CFM_FUNCTION ATSUSetRunStyle
  876.     ENDIF
  877.  
  878. ;
  879. ; extern OSStatus ATSUGetRunStyle(ATSUTextLayout iTextLayout, UniCharArrayOffset iOffset, ATSUStyle *oStyle, UniCharArrayOffset *oRunStart, UniCharCount *oRunLength)
  880. ;
  881.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  882.         IMPORT_CFM_FUNCTION ATSUGetRunStyle
  883.     ENDIF
  884.  
  885. ;
  886. ; extern OSStatus ATSUGetContinuousAttributes(ATSUTextLayout iTextLayout, UniCharArrayOffset iOffset, UniCharCount iLength, ATSUStyle oStyle)
  887. ;
  888.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  889.         IMPORT_CFM_FUNCTION ATSUGetContinuousAttributes
  890.     ENDIF
  891.  
  892. ;     Drawing and measuring    
  893. ;
  894. ; extern OSStatus ATSUDrawText(ATSUTextLayout iTextLayout, UniCharArrayOffset iLineOffset, UniCharCount iLineLength, ATSUTextMeasurement iLocationX, ATSUTextMeasurement iLocationY)
  895. ;
  896.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  897.         IMPORT_CFM_FUNCTION ATSUDrawText
  898.     ENDIF
  899.  
  900. ;
  901. ; extern OSStatus ATSUMeasureText(ATSUTextLayout iTextLayout, UniCharArrayOffset iLineStart, UniCharCount iLineLength, ATSUTextMeasurement *oTextBefore, ATSUTextMeasurement *oTextAfter, ATSUTextMeasurement *oAscent, ATSUTextMeasurement *oDescent)
  902. ;
  903.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  904.         IMPORT_CFM_FUNCTION ATSUMeasureText
  905.     ENDIF
  906.  
  907. ;
  908. ; extern OSStatus ATSUMeasureTextImage(ATSUTextLayout iTextLayout, UniCharArrayOffset iLineOffset, UniCharCount iLineLength, ATSUTextMeasurement iLocationX, ATSUTextMeasurement iLocationY, Rect *oTextImageRect)
  909. ;
  910.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  911.         IMPORT_CFM_FUNCTION ATSUMeasureTextImage
  912.     ENDIF
  913.  
  914. ;     Highlighting    
  915. ;
  916. ; extern OSStatus ATSUHighlightText(ATSUTextLayout iTextLayout, ATSUTextMeasurement iTextBasePointX, ATSUTextMeasurement iTextBasePointY, UniCharArrayOffset iHighlightStart, UniCharCount iHighlightLength)
  917. ;
  918.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  919.         IMPORT_CFM_FUNCTION ATSUHighlightText
  920.     ENDIF
  921.  
  922. ;
  923. ; extern OSStatus ATSUUnhighlightText(ATSUTextLayout iTextLayout, ATSUTextMeasurement iTextBasePointX, ATSUTextMeasurement iTextBasePointY, UniCharArrayOffset iHighlightStart, UniCharCount iHighlightLength)
  924. ;
  925.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  926.         IMPORT_CFM_FUNCTION ATSUUnhighlightText
  927.     ENDIF
  928.  
  929. ;
  930. ; extern OSStatus ATSUGetTextHighlight(ATSUTextLayout iTextLayout, ATSUTextMeasurement iTextBasePointX, ATSUTextMeasurement iTextBasePointY, UniCharArrayOffset iHighlightStart, UniCharCount iHighlightLength, RgnHandle oHighlightRegion)
  931. ;
  932.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  933.         IMPORT_CFM_FUNCTION ATSUGetTextHighlight
  934.     ENDIF
  935.  
  936. ;     Hit-testing    
  937. ;
  938. ; extern OSStatus ATSUPositionToOffset(ATSUTextLayout iTextLayout, ATSUTextMeasurement iLocationX, ATSUTextMeasurement iLocationY, UniCharArrayOffset *ioPrimaryOffset, Boolean *oIsLeading, UniCharArrayOffset *oSecondaryOffset)
  939. ;
  940.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  941.         IMPORT_CFM_FUNCTION ATSUPositionToOffset
  942.     ENDIF
  943.  
  944. ;
  945. ; extern OSStatus ATSUOffsetToPosition(ATSUTextLayout iTextLayout, UniCharArrayOffset iOffset, Boolean iIsLeading, ATSUCaret *oMainCaret, ATSUCaret *oSecondCaret, Boolean *oCaretIsSplit)
  946. ;
  947.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  948.         IMPORT_CFM_FUNCTION ATSUOffsetToPosition
  949.     ENDIF
  950.  
  951. ;     Cursor movement    
  952. ;
  953. ; extern OSStatus ATSUNextCursorPosition(ATSUTextLayout iTextLayout, UniCharArrayOffset iOldOffset, ATSUCursorMovementType iMovementType, UniCharArrayOffset *oNewOffset)
  954. ;
  955.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  956.         IMPORT_CFM_FUNCTION ATSUNextCursorPosition
  957.     ENDIF
  958.  
  959. ;
  960. ; extern OSStatus ATSUPreviousCursorPosition(ATSUTextLayout iTextLayout, UniCharArrayOffset iOldOffset, ATSUCursorMovementType iMovementType, UniCharArrayOffset *oNewOffset)
  961. ;
  962.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  963.         IMPORT_CFM_FUNCTION ATSUPreviousCursorPosition
  964.     ENDIF
  965.  
  966. ;
  967. ; extern OSStatus ATSURightwardCursorPosition(ATSUTextLayout iTextLayout, UniCharArrayOffset iOldOffset, ATSUCursorMovementType iMovementType, UniCharArrayOffset *oNewOffset)
  968. ;
  969.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  970.         IMPORT_CFM_FUNCTION ATSURightwardCursorPosition
  971.     ENDIF
  972.  
  973. ;
  974. ; extern OSStatus ATSULeftwardCursorPosition(ATSUTextLayout iTextLayout, UniCharArrayOffset iOldOffset, ATSUCursorMovementType iMovementType, UniCharArrayOffset *oNewOffset)
  975. ;
  976.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  977.         IMPORT_CFM_FUNCTION ATSULeftwardCursorPosition
  978.     ENDIF
  979.  
  980. ;     Line breaking    
  981. ;
  982. ; extern OSStatus ATSUBreakLine(ATSUTextLayout iTextLayout, UniCharArrayOffset iLineStart, ATSUTextMeasurement iLineWidth, Boolean iUseAsSoftLineBreak, UniCharArrayOffset *oLineBreak)
  983. ;
  984.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  985.         IMPORT_CFM_FUNCTION ATSUBreakLine
  986.     ENDIF
  987.  
  988. ;
  989. ; extern OSStatus ATSUSetSoftLineBreak(ATSUTextLayout iTextLayout, UniCharArrayOffset iLineBreak)
  990. ;
  991.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  992.         IMPORT_CFM_FUNCTION ATSUSetSoftLineBreak
  993.     ENDIF
  994.  
  995. ;
  996. ; extern OSStatus ATSUGetSoftLineBreaks(ATSUTextLayout iTextLayout, UniCharArrayOffset iRangeStart, UniCharCount iRangeLength, ItemCount iMaximumBreaks, UniCharArrayOffset oBreaks[2147483647], ItemCount *oBreakCount)
  997. ;
  998.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  999.         IMPORT_CFM_FUNCTION ATSUGetSoftLineBreaks
  1000.     ENDIF
  1001.  
  1002. ;
  1003. ; extern OSStatus ATSUClearSoftLineBreaks(ATSUTextLayout iTextLayout, UniCharArrayOffset iRangeStart, UniCharCount iRangeLength)
  1004. ;
  1005.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1006.         IMPORT_CFM_FUNCTION ATSUClearSoftLineBreaks
  1007.     ENDIF
  1008.  
  1009. ;     Font matching    
  1010. ;
  1011. ; extern OSStatus ATSUSetFontFallbacks(ItemCount iFontFallbacksCount, ATSUFontID iFontIDs[2147483647], ATSUFontFallbackMethod iFontFallbackMethod)
  1012. ;
  1013.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1014.         IMPORT_CFM_FUNCTION ATSUSetFontFallbacks
  1015.     ENDIF
  1016.  
  1017. ;
  1018. ; extern OSStatus ATSUGetFontFallbacks(ItemCount iMaxFontFallbacksCount, ATSUFontID oFontIDs[2147483647], ATSUFontFallbackMethod *oFontFallbackMethod, ItemCount *oActualFallbacksCount)
  1019. ;
  1020.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1021.         IMPORT_CFM_FUNCTION ATSUGetFontFallbacks
  1022.     ENDIF
  1023.  
  1024. ;
  1025. ; extern OSStatus ATSUMatchFontsToText(ATSUTextLayout iTextLayout, UniCharArrayOffset iTextStart, UniCharCount iTextLength, ATSUFontID *oFontID, UniCharArrayOffset *oChangedOffset, UniCharCount *oChangedLength)
  1026. ;
  1027.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1028.         IMPORT_CFM_FUNCTION ATSUMatchFontsToText
  1029.     ENDIF
  1030.  
  1031. ;
  1032. ; extern OSStatus ATSUSetTransientFontMatching(ATSUTextLayout iTextLayout, Boolean iTransientFontMatching)
  1033. ;
  1034.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1035.         IMPORT_CFM_FUNCTION ATSUSetTransientFontMatching
  1036.     ENDIF
  1037.  
  1038. ;
  1039. ; extern OSStatus ATSUGetTransientFontMatching(ATSUTextLayout iTextLayout, Boolean *oTransientFontMatching)
  1040. ;
  1041.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1042.         IMPORT_CFM_FUNCTION ATSUGetTransientFontMatching
  1043.     ENDIF
  1044.  
  1045. ;     Font ID's    
  1046. ;
  1047. ; extern OSStatus ATSUFontCount(ItemCount *oFontCount)
  1048. ;
  1049.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1050.         IMPORT_CFM_FUNCTION ATSUFontCount
  1051.     ENDIF
  1052.  
  1053. ;
  1054. ; extern OSStatus ATSUGetFontIDs(ATSUFontID oFontIDs[2147483647], ItemCount iArraySize, ItemCount *oFontCount)
  1055. ;
  1056.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1057.         IMPORT_CFM_FUNCTION ATSUGetFontIDs
  1058.     ENDIF
  1059.  
  1060. ;
  1061. ; extern OSStatus ATSUFONDtoFontID(short iFONDNumber, Style iFONDStyle, ATSUFontID *oFontID)
  1062. ;
  1063.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1064.         IMPORT_CFM_FUNCTION ATSUFONDtoFontID
  1065.     ENDIF
  1066.  
  1067. ;
  1068. ; extern OSStatus ATSUFontIDtoFOND(ATSUFontID iFontID, short *oFONDNumber, Style *oFONDStyle)
  1069. ;
  1070.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1071.         IMPORT_CFM_FUNCTION ATSUFontIDtoFOND
  1072.     ENDIF
  1073.  
  1074. ;     Font names    
  1075. ;
  1076. ; extern OSStatus ATSUCountFontNames(ATSUFontID iFontID, ItemCount *oFontNameCount)
  1077. ;
  1078.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1079.         IMPORT_CFM_FUNCTION ATSUCountFontNames
  1080.     ENDIF
  1081.  
  1082. ;
  1083. ; extern OSStatus ATSUGetIndFontName(ATSUFontID iFontID, ItemCount iFontNameIndex, ByteCount iMaximumNameLength, Ptr oName, ByteCount *oActualNameLength, FontNameCode *oFontNameCode, FontPlatformCode *oFontNamePlatform, FontScriptCode *oFontNameScript, FontLanguageCode *oFontNameLanguage)
  1084. ;
  1085.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1086.         IMPORT_CFM_FUNCTION ATSUGetIndFontName
  1087.     ENDIF
  1088.  
  1089. ;
  1090. ; extern OSStatus ATSUFindFontName(ATSUFontID iFontID, FontNameCode iFontNameCode, FontPlatformCode iFontNamePlatform, FontScriptCode iFontNameScript, FontLanguageCode iFontNameLanguage, ByteCount iMaximumNameLength, Ptr oName, ByteCount *oActualNameLength, ItemCount *oFontNameIndex)
  1091. ;
  1092.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1093.         IMPORT_CFM_FUNCTION ATSUFindFontName
  1094.     ENDIF
  1095.  
  1096. ;
  1097. ; extern OSStatus ATSUFindFontFromName(Ptr iName, ByteCount iNameLength, FontNameCode iFontNameCode, FontPlatformCode iFontNamePlatform, FontScriptCode iFontNameScript, FontLanguageCode iFontNameLanguage, ATSUFontID *oFontID)
  1098. ;
  1099.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1100.         IMPORT_CFM_FUNCTION ATSUFindFontFromName
  1101.     ENDIF
  1102.  
  1103. ;     Font features    
  1104. ;
  1105. ; extern OSStatus ATSUCountFontFeatureTypes(ATSUFontID iFontID, ItemCount *oTypeCount)
  1106. ;
  1107.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1108.         IMPORT_CFM_FUNCTION ATSUCountFontFeatureTypes
  1109.     ENDIF
  1110.  
  1111. ;
  1112. ; extern OSStatus ATSUCountFontFeatureSelectors(ATSUFontID iFontID, ATSUFontFeatureType iType, ItemCount *oSelectorCount)
  1113. ;
  1114.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1115.         IMPORT_CFM_FUNCTION ATSUCountFontFeatureSelectors
  1116.     ENDIF
  1117.  
  1118. ;
  1119. ; extern OSStatus ATSUGetFontFeatureTypes(ATSUFontID iFontID, ItemCount iMaximumTypes, ATSUFontFeatureType oTypes[2147483647], ItemCount *oActualTypeCount)
  1120. ;
  1121.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1122.         IMPORT_CFM_FUNCTION ATSUGetFontFeatureTypes
  1123.     ENDIF
  1124.  
  1125. ;
  1126. ; extern OSStatus ATSUGetFontFeatureSelectors(ATSUFontID iFontID, ATSUFontFeatureType iType, ItemCount iMaximumSelectors, ATSUFontFeatureSelector oSelectors[2147483647], Boolean oSelectorIsOnByDefault[2147483647], ItemCount *oActualSelectorCount, Boolean *oIsMutuallyExclusive)
  1127. ;
  1128.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1129.         IMPORT_CFM_FUNCTION ATSUGetFontFeatureSelectors
  1130.     ENDIF
  1131.  
  1132. ;
  1133. ; extern OSStatus ATSUGetFontFeatureNameCode(ATSUFontID iFontID, ATSUFontFeatureType iType, ATSUFontFeatureSelector iSelector, FontNameCode *oNameCode)
  1134. ;
  1135.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1136.         IMPORT_CFM_FUNCTION ATSUGetFontFeatureNameCode
  1137.     ENDIF
  1138.  
  1139. ;     Font tracking value & names    
  1140. ;
  1141. ; extern OSStatus ATSUCountFontTracking(ATSUFontID iFontID, ATSUVerticalCharacterType iCharacterOrientation, ItemCount *oTrackingCount)
  1142. ;
  1143.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1144.         IMPORT_CFM_FUNCTION ATSUCountFontTracking
  1145.     ENDIF
  1146.  
  1147. ;
  1148. ; extern OSStatus ATSUGetIndFontTracking(ATSUFontID iFontID, ATSUVerticalCharacterType iCharacterOrientation, ItemCount iTrackIndex, Fixed *oFontTrackingValue, FontNameCode *oNameCode)
  1149. ;
  1150.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1151.         IMPORT_CFM_FUNCTION ATSUGetIndFontTracking
  1152.     ENDIF
  1153.  
  1154. ;     Font variations    
  1155. ;
  1156. ; extern OSStatus ATSUCountFontVariations(ATSUFontID iFontID, ItemCount *oVariationCount)
  1157. ;
  1158.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1159.         IMPORT_CFM_FUNCTION ATSUCountFontVariations
  1160.     ENDIF
  1161.  
  1162. ;
  1163. ; extern OSStatus ATSUGetIndFontVariation(ATSUFontID iFontID, ItemCount iVariationIndex, ATSUFontVariationAxis *oATSUFontVariationAxis, ATSUFontVariationValue *oMinimumValue, ATSUFontVariationValue *oMaximumValue, ATSUFontVariationValue *oDefaultValue)
  1164. ;
  1165.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1166.         IMPORT_CFM_FUNCTION ATSUGetIndFontVariation
  1167.     ENDIF
  1168.  
  1169. ;
  1170. ; extern OSStatus ATSUGetFontVariationNameCode(ATSUFontID iFontID, ATSUFontVariationAxis iAxis, FontNameCode *oNameCode)
  1171. ;
  1172.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1173.         IMPORT_CFM_FUNCTION ATSUGetFontVariationNameCode
  1174.     ENDIF
  1175.  
  1176. ;     Font Instances    
  1177. ;
  1178. ; extern OSStatus ATSUCountFontInstances(ATSUFontID iFontID, ItemCount *oInstances)
  1179. ;
  1180.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1181.         IMPORT_CFM_FUNCTION ATSUCountFontInstances
  1182.     ENDIF
  1183.  
  1184. ;
  1185. ; extern OSStatus ATSUGetFontInstance(ATSUFontID iFontID, ItemCount iFontInstanceIndex, ItemCount iMaximumVariations, ATSUFontVariationAxis oAxes[2147483647], ATSUFontVariationValue oValues[2147483647], ItemCount *oActualVariationCount)
  1186. ;
  1187.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1188.         IMPORT_CFM_FUNCTION ATSUGetFontInstance
  1189.     ENDIF
  1190.  
  1191. ;
  1192. ; extern OSStatus ATSUGetFontInstanceNameCode(ATSUFontID iFontID, ItemCount iInstanceIndex, FontNameCode *oNameCode)
  1193. ;
  1194.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1195.         IMPORT_CFM_FUNCTION ATSUGetFontInstanceNameCode
  1196.     ENDIF
  1197.  
  1198.     ENDIF ; __ATSUNICODE__ 
  1199.  
  1200.